package com.fastloan.mgt.model.model.vo;

import com.alibaba.fastjson.JSON;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * @author yanwe
 * createTime 2017-12-2017/12/14 15:24
 */
public class TobaccoModelVo {

    @NotNull
    private String serialNumber;

    private boolean passed;

    private BigDecimal creditLine;

    private BigDecimal interestRate;

    private String ratingLevel;

    private String suggestion;

    private String reason;

    private String repaymentWay;

    private boolean manualApproval;

    private Integer repaymentTimeLimit;

    /**
     * 准入模型结果
     */
    private AdmissionModelResult admissionModelResult;

    /**
     * 预警模型结果
     */
    private WarningModelResult warningModelResult;

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public String getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber;
    }

    public boolean isPassed() {
        return passed;
    }

    public void setPassed(boolean passed) {
        this.passed = passed;
    }

    public BigDecimal getCreditLine() {
        return creditLine;
    }

    public void setCreditLine(BigDecimal creditLine) {
        this.creditLine = creditLine;
    }

    public BigDecimal getInterestRate() {
        return interestRate;
    }

    public void setInterestRate(BigDecimal interestRate) {
        this.interestRate = interestRate;
    }

    public String getRatingLevel() {
        return ratingLevel;
    }

    public void setRatingLevel(String ratingLevel) {
        this.ratingLevel = ratingLevel;
    }

    public String getSuggestion() {
        return suggestion;
    }

    public void setSuggestion(String suggestion) {
        this.suggestion = suggestion;
    }

    public String getRepaymentWay() {
        return repaymentWay;
    }

    public void setRepaymentWay(String repaymentWay) {
        this.repaymentWay = repaymentWay;
    }

    public boolean isManualApproval() {
        return manualApproval;
    }

    public void setManualApproval(boolean manualApproval) {
        this.manualApproval = manualApproval;
    }

    public Integer getRepaymentTimeLimit() {
        return repaymentTimeLimit;
    }

    public void setRepaymentTimeLimit(Integer repaymentTimeLimit) {
        this.repaymentTimeLimit = repaymentTimeLimit;
    }

    public AdmissionModelResult getAdmissionModelResult() {
        return admissionModelResult;
    }

    public void setAdmissionModelResult(AdmissionModelResult admissionModelResult) {
        this.admissionModelResult = admissionModelResult;
    }

    public WarningModelResult getWarningModelResult() {
        return warningModelResult;
    }

    public void setWarningModelResult(WarningModelResult warningModelResult) {
        this.warningModelResult = warningModelResult;
    }

    public static void main(String[] args) {
        TobaccoModelVo tobaccoModelVo = new TobaccoModelVo();
        tobaccoModelVo.setSerialNumber("123");
        AdmissionModelResult admissionModelResult = new AdmissionModelResult();
        List<AdmissionResult> admissionResults = new ArrayList<>();
        AdmissionResult admissionResult = new AdmissionResult();
        admissionResult.setExpression("准入规则表达式");
        admissionResult.setName("准入规则名称");
        admissionResult.setPassed(true);
        admissionResults.add(admissionResult);
        admissionModelResult.setAdmissionResult(admissionResults);
        tobaccoModelVo.setAdmissionModelResult(admissionModelResult);
        WarningModelResult warningModelResult = new WarningModelResult();
        List<WarningResult> warningModelResults = new ArrayList<>();
        WarningResult warningResult = new WarningResult();
        warningResult.setExpression("预警规则表达式");
        warningResult.setName("预警规则名称");
        warningResult.setPassed(true);
        warningModelResults.add(warningResult);
        warningModelResult.setWarningResultList(warningModelResults);
        warningModelResult.setTrigger(true);
        tobaccoModelVo.setWarningModelResult(warningModelResult);
        tobaccoModelVo.setPassed(true);
        tobaccoModelVo.setCreditLine(BigDecimal.valueOf(100000));
        tobaccoModelVo.setInterestRate(BigDecimal.valueOf(0.2));
        tobaccoModelVo.setRatingLevel("评级等级");
        tobaccoModelVo.setSuggestion("决策建议");
        System.out.println(JSON.toJSONString(tobaccoModelVo));
    }
}
